<?php
class PNPerson extends PNObject {
  function PNPerson($init=null, $where='')
  {
    $this->PNObject();

    $this->_objType       = 'votethailandpoll_person';
    $this->_objField      = 'id';
    $this->_objPath       = 'form';

    $this->_init($init, $where);
  }


  function insertPreProcess(){
    $vil_id = $this->_objData['vil_id'];
    $where = 'vil_id = '.$vil_id;
    $data = DBUtil::selectObject( 'votethailandpoll_village', $where, array('moo'));
    $this->_objData['vil_moo'] = $data[moo];
  }

  function updatePreProcess(){
    $vil_id = $this->_objData['vil_id'];
    $where = 'vil_id = '.$vil_id;
    $data = DBUtil::selectObject( 'votethailandpoll_village', $where, array('moo'));
    $this->_objData['vil_moo'] = $data[moo];
  }

}